package com.quwancode.springbootmysql.common.query;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;

/**
 * 查询公共参数
 *
 * @author chuck chuck.pg@outlook.com
 */
@Data
public class Query {

    @Min(value = 1, message = "页码最小值为 1")
    Integer page = 1;

    @Range(min = 1, max = 1000, message = "每页条数，取值范围 1-1000")
    Integer limit = 10;
}
